﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    public  class Supplier
    {
        public string SupplierID { get; set; }  //客户编号
        public string SupplierName { get; set; }//客户
        public Contact ContactInfo { get; set; }//联系方式
        public Supplier() { }
        public Supplier(string supplierID, string supplierName)
        {
            this.SupplierID = supplierID;
            this.SupplierName = supplierName;
        }
        public Supplier(Supplier c, Contact bo = null)//关联类
        {
            this.SupplierID = c.SupplierID;
            this.SupplierName = c.SupplierName;
            if (bo != null)
            {
                this.ContactInfo = new Contact();
                this.ContactInfo.SpellingCode = bo.SpellingCode;
                this.ContactInfo.Address = bo.Address;
                this.ContactInfo.ZipCode = bo.ZipCode;
                this.ContactInfo.Tel = bo.Tel;
                this.ContactInfo.Fax = bo.Fax;
                this.ContactInfo.BankName = bo.BankName;
                this.ContactInfo.BankAccount = bo.BankAccount;
                this.ContactInfo.Contacter = bo.Contacter;
                this.ContactInfo.Email = bo.Email;
            }
        }
    }
}
